package com.unionpay.acp.controller;

import com.unionpay.acp.test.BaseResponse;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author caizw
 * @date 2018-08-23
 * @description: java类作用描述
 */
@RestController
public class WebController {

    @RequestMapping("/pages/{page}")
    public ModelAndView web(@PathVariable("page") String page){
        return new ModelAndView("/pages/" + page);
    }

    @RequestMapping("")
    public ModelAndView index(){
        ModelAndView mv =  new ModelAndView("/index");
        return mv;
    }

    @RequestMapping(value = "/myTest")
    public BaseResponse myTest(){
        return new BaseResponse(200,"哈哈哈");
    }

}
